import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { RepairViolationComponent } from './repairViolation/repairViolation';
import { UnRepairViolationComponent } from './unRepairViolation/unRepairViolation';

const routes: Routes = [
	{
		path: '',
		children: [
			{
				path: '',
				redirectTo: 'repair',
			},
			{
				path: 'repair',
				component: RepairViolationComponent,
				data: {
					title: '已修复违规',
					url: 'violation/repair',
				},
			},
			{
				path: 'unRepair',
				component: UnRepairViolationComponent,
				data: {
					title: '未修复违规',
					url: 'violation/unRepair',
				},
			},
		],
	},
];

@NgModule({
	imports: [RouterModule.forChild(routes)],
	exports: [RouterModule],
})
export class ViolationRoutingModule {}
